<?php
namespace di;

class Person{

    public function __construct(Car $obj,$a=123)
    {   
        $this->obj=$obj;
        $this->a=$a;
    }

    public function buy(){
        // $bmw=new Car();
        // $bmw=new $obj;
        return $this->a.'|'.$this->obj->pay();
    }
}